public class everynum {
    public static void main(String[] args) {
        int i = 123;
        while(i != 0){
            System.out.println(i%10);
            i /= 10;
        }
    }
}
